Test latency jitter under stress condition Single-threaded executor Default autoware with hot path

In [20]:
from caret_analyze.plot import Plot
from caret_analyze.plot import chain_latency
from caret_analyze import Application, Architecture, Lttng
from bokeh.plotting import output_notebook, figure, show
from caret_analyze import Architecture, Application, Lttng
from bokeh.plotting import output_notebook
output_notebook()
Loading BokehJS ...

End-to-End path¶

In [21]:
lttng = Lttng('./prioritized_executors_stress_fixed_workload')
arch = Architecture('yaml','./architecture_with_e2e_path.yaml')
# arch = Architecture('lttng','./single_threaded_executor_normal')
app = Application(arch, lttng)
converting: 311068it [00:17, 17991.51it/s]                                                                            
310962 events found.
loading: 100%|████████████████████████████████████████████████████████████▉| 310960/310962 [00:09<00:00, 33175.85it/s]
In [22]:
# arch.export('architecture.yaml')
In [23]:
# p = arch.search_paths('/FrontLidarDriver','/RayGroundFilter','/MPCController','/VehicleDBWSystem')
# p[0].summary.pprint()
In [24]:
# arch.add_path('e2e_path',p[0])
# app =Application(arch,lttng)
In [25]:
# arch.export('architecture_with_e2e_path.yaml')
In [26]:
path = app.get_path('e2e_path')
path.verify()
WARNING : 2024-01-16 13:22:38 | 'caret/rclcpp' may not be used in subscriber of '/PointsTransformerFront'.
WARNING : 2024-01-16 13:22:38 | 'caret/rclcpp' may not be used in subscriber of '/PointCloudFusion'.
WARNING : 2024-01-16 13:22:38 | 'caret/rclcpp' may not be used in subscriber of '/RayGroundFilter'.
WARNING : 2024-01-16 13:22:38 | 'caret/rclcpp' may not be used in subscriber of '/EuclideanClusterDetector'.
WARNING : 2024-01-16 13:22:38 | 'caret/rclcpp' may not be used in subscriber of '/ObjectCollisionEstimator'.
WARNING : 2024-01-16 13:22:38 | 'caret/rclcpp' may not be used in subscriber of '/BehaviorPlanner'.
WARNING : 2024-01-16 13:22:38 | 'caret/rclcpp' may not be used in subscriber of '/MPCController'.
WARNING : 2024-01-16 13:22:38 | 'caret/rclcpp' may not be used in subscriber of '/VehicleInterface'.
WARNING : 2024-01-16 13:22:38 | 'caret/rclcpp' may not be used in subscriber of '/VehicleDBWSystem'.
Out[26]:
False
In [27]:
chain_latency(path, granularity='node', lstrip_s=0, rstrip_s=0)
Out[27]:
No description has been provided for this image
In [28]:
chain_latency(path, granularity='end-to-end', lstrip_s=0, rstrip_s=0)
Out[28]:
No description has been provided for this image
In [29]:
# plot best case
plot = Plot.create_response_time_timeseries_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision
BokehUserWarning: out of range integer may result in loss of precision
In [30]:
# plot best case
plot = Plot.create_response_time_histogram_plot(path, case='best')
plot.show()
WARNING : 2024-01-16 13:22:45 | The maximum number of legends drawn by default is 20. If you want all legends to be displayed, please specify the `full_legends` option to True.
In [31]:
# plot best case
plot = Plot.create_response_time_stacked_bar_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision
BokehUserWarning: out of range integer may result in loss of precision

Hot Path¶

In [32]:
lttng = Lttng('./prioritized_executors_stress_fixed_workload')
arch = Architecture('yaml','./architecture_with_hot_path.yaml')
# arch = Architecture('lttng','./single_threaded_executor_normal')
app = Application(arch, lttng)
310960 events found.
loading: 100%|█████████████████████████████████████████████████████████████| 310960/310960 [00:09<00:00, 32920.19it/s]
In [33]:
path = app.get_path('hot_path')
path.verify()
WARNING : 2024-01-16 13:24:16 | 'caret/rclcpp' may not be used in subscriber of '/PointsTransformerFront'.
WARNING : 2024-01-16 13:24:16 | 'caret/rclcpp' may not be used in subscriber of '/PointCloudFusion'.
WARNING : 2024-01-16 13:24:16 | 'caret/rclcpp' may not be used in subscriber of '/RayGroundFilter'.
WARNING : 2024-01-16 13:24:16 | 'caret/rclcpp' may not be used in subscriber of '/EuclideanClusterDetector'.
WARNING : 2024-01-16 13:24:16 | 'caret/rclcpp' may not be used in subscriber of '/ObjectCollisionEstimator'.
Out[33]:
False
In [34]:
chain_latency(path, granularity='node', lstrip_s=0, rstrip_s=0)
Out[34]:
No description has been provided for this image
In [35]:
chain_latency(path, granularity='end-to-end', lstrip_s=0, rstrip_s=0)
Out[35]:
No description has been provided for this image
In [36]:
# plot best case
plot = Plot.create_response_time_timeseries_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision
BokehUserWarning: out of range integer may result in loss of precision
In [37]:
# plot best case
plot = Plot.create_response_time_histogram_plot(path, case='best')
plot.show()
WARNING : 2024-01-16 13:24:22 | The maximum number of legends drawn by default is 20. If you want all legends to be displayed, please specify the `full_legends` option to True.
In [38]:
# plot best case
plot = Plot.create_response_time_stacked_bar_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision
BokehUserWarning: out of range integer may result in loss of precision